<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><%@ taglib
	uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>海科集团任务督办管理系统-任务列表</title>
<style>
#title {
	text-align: center;
}

#center {
	margin: 0 auto;
	width: 1100px;
}

.left {
	font-size: 18px;
	font-weight: bold;
	/* 	width: 100px; */
}

.right {
	font-size: 18px;
	/* 	right: 500px; */
}

table, table tr th, table tr td {
	border: 1px solid #0094ff;
}

table {
	width: 1100px;
	min-height: 25px;
	line-height: 25px;
	text-align: center;
	border-collapse: collapse;
}
</style>

</head>
<body>
	<div id="center">
		<form id="form1" name="form1" method="post">
			<table id="table">
				<tr>
					<td class="left" style="width: 260px;"><input id="proId"
						value=${proId } type="hidden" /><span>会议名称</span></td>
					<td class="left" style="width: 200px;"><span>督办事项</span></td>
					<td class="left" style="width: 120px;"><span>计划完成日期</span></td>
					<td class="left" style="width: 90px;"><span>整体进度</span></td>
					<td class="left" style="width: 300px;"><span>完成情况</span></td>
					<td class="left" style="width: 120px;"><span>提交时间</span></td>
				</tr>
				<c:forEach items="${contentlist}" var="item">
					<tr>
						<td class="right">${item.INF_METTINGNAME}</td>
						<td class="right">${item.PRO_CONTENT}</td>
						<td class="right">${item.PRO_PLANFINISHDATE}</td>
						<td class="right">${item.PROR_PROGRESS}%</td>
						<td class="right">${item.PROR_CONTENT}</td>
						<td class="right"><c:if
								test="${fn:length(item.PROR_COMMITTIME)>10}">
				                      ${fn:substring(item.PROR_COMMITTIME, 0, 10)}
				                  </c:if></td>
					</tr>
				</c:forEach>
				<tr>
					<td colspan=3><a href='task/exportExcel?proId=${proId }'>导出excel</a></td>
					</td>
					<td colspan=3><span>附件下载:</span>
						<ul id="checkfileList"></ul></td>
				</tr>
			</table>
		</form>
	</div>
	<script type="text/javascript"
		src="resourse/jquery-easyui-1.7.6/jquery.min.js"></script>
	<script>
		$(function() {
			getFileList();
		})

		function getFileList() {
			$.ajax({
				type : "post",
				url : "file/getFileList",
				data : {
					fileTable : "at_projectresult",
					fileRow : $('#proId').val()
				},
				success : function(data) {
					var dataArray = eval(data);
					initFile(dataArray);
				},
				error : function(XMLHttpRequest, textStatus, errorThrown) {
					$.messager.alert('消息', errorThrown);
				}
			});
		}

		function initFile(dataArray) {
			$("#checkfileList").empty();
			// 			sselectedFileNameList = [];
			selectedFileList = [];
			dataArray
					.forEach(function(e, i, a) {
						$("#checkfileList")
								.append(
										"<li class=\"fileinfo\">"
												+ "<a style=\" color: blue; margin-left: 5px;\" target=_blank href=\"file/download?id="
												+ e.FILE_ID
												+ "\">"
												+ e.FILE_NAME
												+ "</a>"
												+ "<a style=\"display: none; color: red; margin-left: 30px;\" href=\"javascript:void(0)\" onclick=\"RemoveFile(this,'"
												+ e.FILE_NAME + "')\">删除</a>"
												+ "</li>");
						// 						sselectedFileNameList.push(e.FILE_NAME);
						AddMoushover();
					});
		}
	</script>
</body>
</html>